<div class="col-xs-12 info-center" >
    <ol class="breadcrumb" >
        <li> <i class="fa fa-anchor"></i>
            &nbsp;投诉管理
        </li>
        <li>投诉记录</li>
    </ol>
        <div class="panel ">

            <div class="panel-heading" >
                <i class="fa fa-list"></i>
                &nbsp;&nbsp;投诉信息表

            </div>
        <!--<form class="search-form" action={:U("Comp/index")} method="get">

                <div class="col-xs-3 search-col">
                    <div class="input-group">
                        <span class="input-group-addon">内容</span>
                        <input type="text" name="name" class="form-control"  placeholder="内容"></div>
                </div>
                <div class="col-xs-2 search-col">
                    <button  type="submit" class="btn btn-warning">
                        <i class="fa fa-search"></i>
                        &nbsp;搜索
                    </button>
                </div>
            </div>
        </form>-->
            <table  class="table table-bordered table-striped table-mcit" >
                <thead>
                <tr>
                    <th >
                        <empty name="is_order_name">
                            <button class='btn btn-block btn-mcit' type='submit' name='order_name' value=''>ID</button>
                            <else/>
                            <button class='btn btn-block btn-mcit btn-mcit-active'  type='submit' name='order_name' value=''>
                                <if condition="$order_name eq 1">
                                    <i class="fa fa-chevron-down"></i>
                                    <else/>
                                    <i class="fa fa-chevron-up"></i>
                                </if>
                                &nbsp;ID
                            </button>
                        </empty>
                    </th>
                    <th>
                        <empty name="is_order_stu_num">
                            <button class='btn btn-block btn-mcit' type='submit' name='order_stu_num' value=>用户</button>
                            <else/>
                            <button class='btn btn-block btn-mcit btn-mcit-active' type='submit' name='order_stu_num' value=''>
                                <if condition="$order_stu_num eq 1">
                                    <i class="fa fa-chevron-down"></i>
                                    <else/>
                                    <i class="fa fa-chevron-up"></i>
                                </if>
                                &nbsp;用户
                            </button>
                        </empty>
                    </th>
                    <th>
                        <empty name="is_order_idcard">
                            <button class='btn btn-block btn-mcit' type='submit' name='order_idcard' value=>电话</button>
                            <else/>
                            <button class='btn btn-block btn-mcit btn-mcit-active' type='submit' name='order_idcard' value=''>
                                <if condition="$order_idcard eq 1">
                                    <i class="fa fa-chevron-down"></i>
                                    <else/>
                                    <i class="fa fa-chevron-up"></i>
                                </if>
                                &nbsp;电话
                            </button>
                        </empty>
                    </th>
                    <th>
                        <empty name="is_order_tel">
                            <button class='btn btn-block btn-mcit' type='submit' name='order_tel' value=''>标题</button>
                            <else/>
                            <button class='btn btn-block btn-mcit btn-mcit-active' type='submit' name='order_tel' value=>
                                <if condition="$order_tel eq 1">
                                    <i class="fa fa-chevron-down"></i>
                                    <else/>
                                    <i class="fa fa-chevron-up"></i>
                                </if>
                                &nbsp;标题
                            </button>
                        </empty>
                    </th>
                    <th>
                        <empty name="is_order_tel">
                            <button class='btn btn-block btn-mcit' type='submit' name='order_tel' value=''>投诉内容</button>
                            <else/>
                            <button class='btn btn-block btn-mcit btn-mcit-active' type='submit' name='order_tel' value=>
                                <if condition="$order_tel eq 1">
                                    <i class="fa fa-chevron-down"></i>
                                    <else/>
                                    <i class="fa fa-chevron-up"></i>
                                </if>
                                &nbsp;投诉内容
                            </button>
                        </empty>
                    </th>
                    <th>
                        <empty name="is_order_qq">
                            <button class='btn btn-block btn-mcit' type='submit' name='order_qq' value=''>投诉时间</button>
                            <else/>
                            <button class='btn btn-block btn-mcit btn-mcit-active' type='submit' name='order_qq' value=''>
                                <if condition="$order_qq eq 1">
                                    <i class="fa fa-chevron-down"></i>
                                    <else/>
                                    <i class="fa fa-chevron-up"></i>
                                </if>
                                &nbsp;投诉时间
                            </button>
                        </empty>
                    </th>
                   
                    <th style="width: 20%">
                        <empty name="is_order_edit_self">
                            <button class='btn btn-block btn-mcit' type='submit' name='order_edit_self' value=''>操作</button>
                            <else/>
                            <button class='btn btn-block btn-mcit btn-mcit-active' type='submit' name='order_edit_self' value=''>
                                <if condition="$order_edit_self eq 1">
                                    <i class="fa fa-chevron-down"></i>
                                    <else/>
                                    <i class="fa fa-chevron-up"></i>
                                </if>
                                &nbsp;操作
                            </button>
                        </empty>
                    </th>
                </tr>
                </thead>
                <tbody id="DataTableContent">
                <empty name="rs">
                    <td colspan="99" style="text-align:center" class="danger"> <strong><i class="fa fa-meh-o"></i>
                        &nbsp;&nbsp;当前条件下没有数据</strong>
                    </td>
                    <else />
                    <volist name="rs" id="v">
                        <tr>
                            <td>{$v.id}</td>
                            <td>{$v.member.nickname}</td>
                            <td>{$v.member.phone}</td>
                            <td>{$v.title}</td>
                            <td>{$v.content}</td>
                            <td>{$v.complain_time}</td>
                           
                            <td>
                                <a class="btn btn-success btn-sm" href="__URL__/detail/id/{$v.id}">
                                    <i class="fa fa-eye"></i>
                                &nbsp;查看
                                </a>
                             <!--<a class="btn btn-success btn-sm" href="__APP__/Admin/Evcharger/add/id/{$data.id}">
                                    <i class="fa fa-edit"></i>
                                    &nbsp;添加电桩
                                </a>-->
                                <a class="btn btn-warning btn-sm" href="__URL__/update/id/{$data.id}">
                                <i class="fa fa-edit"></i>
                                &nbsp;备用
                                </a>
                                <if condition="$_SESSION['role'] eq 805 or $_SESSION['role'] eq 802">
                                    <a class="btn btn-sm btn-danger deleteBtn" href="#confirmDelete" data-target="#confirmDelete" data-toggle="modal" data-id='{$v.id}'><i class="fa fa-trash-o"></i>
                                        &nbsp;删除</a>
                                <else /></if>
                            </td>
                        </tr>
                    </volist>
                </empty>
                <tr>
                    <td colspan="99" style="text-align:center">
                        <ul class="pagination">{$pageView}</ul>
                    </td>
                </tr>
                </tbody>
            </table>
        </div>
</div>
<!-- 删除分类 -->
<div id="confirmDelete" class="modal  fade" tabindex="-1" role="dialog" aria-labelledby="myModalLabel"
     aria-hidden="true">
    <div class="modal-dialog">
        <div class="modal-content">
            <div class="modal-header">
                <button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
                <h4 id="myModalLabel">是否确认删除？</h4>
            </div>
            <div class="modal-body">
                注意！此站点下所有电桩都将删除，删除后将不可恢复。
            </div>
            <div class="modal-footer">
                <a class="btn" data-dismiss="modal" aria-hidden="true" id="modelClose">关闭</a>
                <a class="btn btn-primary" id="confirmDeleteBtn">确定</a>
            </div>
        </div></div>
    <div class="hide" id="cache">1</div>
</div>
<import file="js.jquery#chained" />
<script type="text/javascript">
    $(document).ready(function () {

        $(".deleteBtn").click(function (){
            var id = $(this).attr("data-id");
            $("#cache").val(id);
        });
        $("#confirmDeleteBtn").click(function (){
            var id = $("#cache").val();
            //alert(id);
            $.ajax({
                type:"post",
                url:'__URL__/del',
                data:'id='+id,
                success:function(data){
                    if(data == 1){
                        alert("删除成功！");
                    }else{
                        alert("删除失败，请重新提交！");
                    }
                    location.reload();
                }
            });
        });

    });
</script>